The present invention relates to a communication network, and more specifically, to a method for routing and forwarding a data packet with a forwarding RBridge and the corresponding forwarding RBridge.
The transparent interconnection of lots of links (TRILL) is a routing protocol based on a link state algorithm, and a TRILL network consists of routing bridges (RBridges) with a routing and forwarding characteristic, each RBridge acquiring an entire network topology by executing an extended intermediate system to intermediate system (IS-IS) routing protocol, and calculating a routing by means of shortest path first (SPF) algorithm.
FIG. 2 shows a schematic structure of a TRILL network. According to FIG. 2, data packets are transmitted from a host Host-A to a host Host-B over the TRILL network, and pass through three RBridges, of which the nicknames are marked as RB1, RB2 and RB3, respectively. Here, the nickname is a hexadecimal number in 16 bits for identifying one RBridge, and the nicknames of different RBridges are different with each other.
In FIG. 2, the basic communication procedure of each RBridge, i.e. RB1, RB2 and RB3, includes: (1) executing the extended IS-IS routing protocol, establishing a neighborhood relationship with a plurality of adjacent RBridges, exchanging neighborhood information, acquiring the entire network topology finally, and then calculating a routing for the entire network by using the SPF algorithm to generate a nickname routing information base (NRIB) table; (2) generating a nickname forwarding information base (NFIB) table according to the NRIB table; (3) forwarding data packets according to the NFIB table.
Firstly, let's see how each RBridge establishes its own NFIB table in the prior art. After acquiring the network topology with the RBridge acting as the root node itself, each RBridge calculates all paths in which each node is the destination node, constituting the NRIB table. Table 1 below shows a main structure of an existing NRIB table. In following examples, there are provided many specific structures of the table, and in the specific structures only the columns in the table related to the present invention are listed, and other columns that the present invention does not concern or have no relation to the present invention are not listed. Each row in Table 1 is a piece of routing information, and each piece of routing information corresponds to a forwarding path in which the egress RBridge nickname is the destination address. The MAC address of the next hop is obtained according to the egress RBridge nickname parsed from a header of a TRILL data packet, and the TRILL data packet is transmitted to the next hop RBridge through an out port of the TRILL data packet. The main structure of the NFIB table is the same as that of the NRIB table, but in the NRIB table a plurality of paths are direct to the same egress RBridge nickname, and in the NFIB table one optimal path is selected from the plurality of paths in the NRIB, so it can be considered that the NFIB table indicates the routing information extracted from the NRIB table.
TABLE 1Main Structure of Existing NRIB TableEgress RBridgeOut port of TRILLMAC Address forNicknameData packetthe Next Hop
Next, let's see a forwarding procedure of TRILL data packets. With respect to the RBridge receiving an original data packet, for example, the RB1 shown in FIG. 2, checks a layer two forwarding database (FDB) table firstly, and acquires the result of the Port ID/Nickname column Table 2 shows the FDB table of the RB1 in FIG. 2, in which when the Port ID/Nickname column is the out port of the data packet, it can be determined that it is not necessary for the data to be performed a TRILL package, and a normal layer two forwarding is carried out, however, when the Port ID/Nickname column is the egress RBridge nickname of the data packet, it can be determined that it is necessary for the data packet to be performed a TRILL package. For example, when receiving an original data packet, the RB1 checks Table 2, and determines the egress RBridge is the RB3 according to the destination MAC address of the data packet, which shows that a TRILL package needs to be performed on the data packet. Table 3 shows the existing NFIB table of the RB1. Then, the RB1 checks its own NFIB table for the purpose of the egress RBridge nickname to acquire the out port P2 of the TRILL data packet and the RBridge RB2 for the next hop, and transmits the packaged TRILL data packet to the RB 2 through the P2.
TABLE 2FDB Table of RB1Destination MAC Addressof Data PacketPort ID/NicknameHost-AP1Host-BRB3
TABLE 3Existing NFIB Table of RB1Egress RBridgeOut Port of TRILLMAC Address forNicknameData Packetthe Next HopRB2P2RB2RB3P2RB2
With respect to the RBridge receiving the TRILL data packet, for example, the RB2 and RB3 shown in FIG. 2 parse the TRILL data packet firstly, acquire the egress RBridge nickname, and then check the NFIB table to determine whether the RBridges are the ultimate hop of the forwarding path themselves. The specific deciding method includes: if the local RBridge has the same nickname as the egress RBridge, then the local RBridge is the ultimate hop on the forwarding path. If it is not the ultimate hop on the forwarding path, the NFIB table is checked by using the egress RBridge nickname to acquire the out port of the TRILL data packet and the next hop RBridge, and the data packet is forwarded to the acquired next hop RBridge through the out port of the TRILL data packet; and if the local RBridge itself is the ultimate hop on the forwarding path, the TRILL header is stripped off, conventional layer two forwarding is performed, and finally the data packet is forwarded to a host. For example, Table 4 shows the existing NFIB table of the RB2 in FIG. 2. The RB2 determines that it is not the ultimate hop on the forwarding path itself after parsing the TRILL data packet received from the RB1, checks Table 4 to obtain the out port P2 of the TRILL data packet and the MAC address for the next hop of the RB3, and then forwards the TRILL data packet to the RB3 through the P2. Table 5 shows the existing NFIB table of the RB3, and Table 6 shows the FDB table of the RB3. The RB3 determines that it is the ultimate hop on the forwarding path itself after parsing the data packet received from the RB2, strips off the TRILL header to acquire the original data packet, and then directly checks Table 6 for the destination MAC address Host-B of the original data packet without checking Table 5 to acquire the PortID as the P2, and transmits the original data packet to the Host-B through the P2.
TABLE 4Existing NFIB Table of RB2Egress RBridgeOut Port of TRILLMAC Address forNicknameData Packetthe Next HopRB1P1RB1RB3P2RB3
TABLE 5Existing NFIB Table of RB3Egress RBridgeOut Port of TRILLMAC Address forNicknameData Packetthe Next HopRB1P1RB2RB2P1RB2
TABLE 6FDB Table of RB3Destination MAC Addressof Data PacketPort ID/NicknameHost-ARB1Host-BP2
In the process of the above boundary RBridge (i.e. the ultimate RBridge RB3) performing the TRILL data packet processing, it is necessary to carry out a series of lengthy operations, such as parsing the TRILL data packet header, acquiring the egress RBridge nickname, comparing with the local RBridge nickname, stripping the TRILL header off, checking the FDB table, forwarding the data packet finally, and the like, which consumes many system resources. Since the boundary RBridge is at a particular position, it has a greater system burden originally and performs lengthy operations again, which leads to a performance bottleneck easily.
It has been considered in the prior art that a portion of the job of the boundary RBridge, such as parsing the TRILL packet header, acquiring the egress RBridge nickname, comparing with the local RBridge nickname, stripping the TRILL header off, and so on, is transferred to the penultimate hop RBridge on the forwarding path, however, in the process of forwarding each data packet, each RBridge undergoes a lengthy procedure re-deciding whether the penultimate hop of the forwarding path is itself, which affects the forwarding efficiency.